%% Carbon Taxes Around the World: Cooperation, Strategic Interactions, and Spillovers
% IMF Economic Review
% Alessandro Moro and Valerio Nispi Landi
% Replication files
% This file saves the IRFs when AE conducts an optimal policy

dynare climate
load path0
T=200;


variables_pct = {'gdp', 'gdpz', 'c', 'cz', 's', 'kB', 'yBz', 'kG', 'kB_zu', 'kG_zu', 'kB_zz', 'kG_zz', 'kB_zd', 'kG_zd'};
variables_dev = {'bY', 'tbY', 'ErkB', 'ErkG', 'ErkB_zu', 'ErkG_zu', 'ErkB_zz', 'ErkG_zz', 'ErkB_zd', 'ErkG_zd', 'r', 'rz', 'uip', 'mu', 'muz'};
variables_div100 = {'eW', 'e', 'ez', 'x'};

for i = 1:length(variables_pct)
    eval([variables_pct{i}, '1 = (', variables_pct{i}, 's(1:T))./(', variables_pct{i}, '0(1:T))-1;']);
end

for i = 1:length(variables_dev)
    eval([variables_dev{i}, '1 = ', variables_dev{i}, 's(1:T) - ', variables_dev{i}, '0(1:T);']);
end

for i = 1:length(variables_div100)
    eval([variables_div100{i}, '1 = (', variables_div100{i}, 's(1:T)-', variables_div100{i}, '0(1:T))/100;']);
end



save path1 gdp1 gdpz1 c1 cz1 kB1 kG1 kB_zu1 kG_zu1 kB_zz1 kG_zz1 kB_zd1 kG_zd1 ErkB1...
e1 ez1 ErkG1 ErkB_zu1 ErkG_zu1 ErkB_zz1 ErkG_zz1 ErkB_zd1 ErkG_zd1 s1 bY1 tbY1 eW1 x1 r1 rz1 uip1 yBz1 mu1 muz1
 
 